package cn.e4j.modular.api.controller;

import cn.e4j.core.dto.impl.Dto;
import cn.e4j.core.dto.requestDtoResolver.DtoParam;
import cn.e4j.core.dto.requestDtoResolver.DtoWapper;
import cn.e4j.core.reqres.response.ResponseData;
import cn.e4j.core.reqres.response.SuccessResponseData;
import cn.e4j.modular.api.service.GwaService;
import cn.e4j.modular.api.service.Gwat100Service;
import cn.e4j.modular.api.service.Gwat200Service;
import cn.e4j.modular.system.service.impl.SystemServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

/**
 * 意向商机指派作业 控制类
 * Created by shixc on 2018/5/5.
 */
@RestController
@RequestMapping("api/mbs/gwat200")
public class AppGwat200Controller {
    private static Logger logger = LoggerFactory.getLogger(AppGwat200Controller.class);

    @Autowired
    Gwat200Service gwat200Service;

    @Autowired
    Gwat100Service gwat100Service;
//
//    @Autowired
//    WXUserService wXUserService;
//
//    @Autowired
//    Gwcm_tDao gwcm_tDao;

    @Autowired
    SystemServiceImpl systemService;

    @Autowired
    GwaService gwaService;

    /**
     * 获取产品特征值
     *
     * @return
     */
    @RequestMapping(value = "getGwanData")
    public ResponseData getGwanData(@DtoParam DtoWapper wapper) {
        Dto inDto = wapper.getDto();
        List<Dto> list = new ArrayList<>();
        try {
            list = gwat200Service.getGwan003(inDto);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return ResponseData.success(list);
    }
}
